From: Vincent Hanquez Date: Fri, 10 Sep 2010 18:01:31 +0000 (+0100) Subject: oxenstored: when reading / read automatically the root node. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~11511 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=c528148dd32190ab302e602384a63d4519eaba86;p=xen.git oxenstored: when reading / read automatically the root node. Signed-off-by: Vincent Hanquez --- diff --git a/tools/ocaml/xenstored/store.ml b/tools/ocaml/xenstored/store.ml index 34552bb9d3..4c9b1663e6 100644 --- a/tools/ocaml/xenstored/store.ml +++ b/tools/ocaml/xenstored/store.ml @@ -300,7 +300,12 @@ let read store perm path = Node.check_perm ent perm Perms.READ; ent.Node.value in - Path.apply store.root path do_read + if path = [] then ( + let ent = store.root in + Node.check_perm ent perm Perms.READ; + ent.Node.value + ) else + Path.apply store.root path do_read let ls store perm path = let children =